<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        // var arr = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
        // var arr = ['关羽', '张飞', '马超', '赵云', '黄忠', '刘备', '姜维']
        // for (var i = 0; i < arr.length; i++) {
        //     console.log(arr[i]);
        // }
        // var arr = [2, 6, 1, 77, 52, 25, 7],
        //     max = arr[0];
        // for (var i = 0; i < arr.length - 1; i++) {
        //     max = arr[i] > arr[i + 1] ? max : arr[i + 1];
        // }
        // console.log(max);
        // console.log(Math.max(...arr));
        // var arr = ['red', 'green', 'blue', 'pink'],
        //     str = '';
        //     console.log( arr.join('|')+'|');
        //     console.log(arr.join());
        // for (var i = 0; i <arr.length; i++) {
        //     str += arr[i] + '|'
        // }
        // console.log(str);
        // arr = '有点意思';
        // console.log(arr[0]);
        // var arr = [],
        // arr1=[];
        // for (var i = 1; i <= 10; i++) {
        //     arr.push(i)
        //     arr1[arr1.length]=i
        // }
        // console.log(arr);
        // console.log(arr1);
        var arr = [15, 0, 15, 2, 13, 1, 3, 8, 7, 15, 55, 34, -15],
            arr1 = [],
            arr2 = [],
            j = 0;
        for (var i = 0; i < arr.length; i++) {
            arr[i] >= 10 && (arr1[arr1.length] = arr[i]);
            arr[i] >= 10 && arr2.push(arr[i]);
            arr[i] >= 10 && (arr1[j++] = arr[i]);
            
        }
        console.log(arr1);
        console.log(arr2);
    </script>
</head>

<body>

</body>

</html>